package com.anlogic.sdk.bsp.model;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.CoreException;

public class PlatformProjectNature implements IProjectNature {
	private IProject project;
	
	public static final String ID = "com.anlogic.sdk.bsp.platformProject";
	
	public void configure() throws CoreException {}
	
	public void deconfigure() throws CoreException {}
	
	public IProject getProject() {
		return this.project;
	}
	
	public void setProject(IProject project) {
		this.project = project;
	}
	
	public static String getId() {
		return ID;
	}
	
	public static boolean isPlatformProject(IProject project) throws CoreException {
		if (!project.isAccessible())
			return false; 
		return project.hasNature(getId());
	}
}
